import fetch from './axios'
//首页列表
export function fetchGoodList(params) {
	return fetch({url: '/good/list', method: 'GET', params})
}
//find左侧列表
export function fetchFindlist(){
	return fetch({url:"/good/cates",method:'GET'})
}
// 详情
export function fetchgooddetail(params){
	return fetch({url:"/good/detail",method:'GET',params})
}
// 登陆接口
export function fetchlogion(data){
	return fetch({url:"/user/logion",method:'POST',data})
}
// 注册接口
export function fetchregister(data){
	return fetch({url:'/user/register',method:'POST',data})
}
// 加入购物车接口
export function fetchaddcartr(data){
	return fetch({url:'/cart/add',method:'POST',data})
}
// 请求购物车列表接口
export function fetchcartlist(params){
	return fetch({url:'/cart/list',method:'GET',params})
}
// 删除购物车接口
export function fetchdellist(params){
	return fetch({url:'/cart/del',method:'GET',params})
}
//提交购物车
export function fecthOncart(data){
	return fetch({url:'/cart/pay',method:'POST',data})
}




export default {
	fetchGoodList,
	fetchFindlist,
	fetchgooddetail,
	fetchlogion,
	fetchregister,
	fetchaddcartr,
	fetchcartlist,
	fetchdellist,
	fecthOncart
}